package com.hzqy.web.login;

import java.util.Observable;
import java.util.Observer;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.hzqy.persistence.dao.commons.CommonsDao;
import com.hzqy.web.vo.EpgInfoVo;


public abstract class ObserverFather implements Observer {
	HttpServletRequest request;
    HttpSession session;
    EpgInfoVo epgInfoVo = null;
    
    CommonsDao dataDao;
	
	public ObserverFather(HttpServletRequest request){
		this.request = request;
		this.session = request.getSession();
		WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(session.getServletContext()); 
		dataDao = (CommonsDao)webApplicationContext.getBean("commonsDao");
	}
	public void update(Observable o, Object arg){
		if(arg instanceof EpgInfoVo){
			epgInfoVo = (EpgInfoVo)arg;
		}
	}
}
